<!-- 卡位模块 -->
<script id="keyword_rank_box" type="text/html">
	<table class="metrotable datatable">
		<thead>
			<tr>
				<th width="20%" class="head1">推广计划</th>
				<th width="20%" class="head0">推广组</th>
				<th width="15%" class="head1">关键词</th>
				<th width="10%" class="head0">实时排名</th>
				<th width="10%" class="head1">期望排名</th>
				<th width="10%" class="head0">当前出价</th>
				<th width="15%" class="head1">操作</th>
			</tr>
		</thead>
		<tbody>
			<% for(var i in list){ %>
			<tr data-keyword_id="<%= list[i].keyword_id %>" data-campaign_id="<%= list[i].campaign_id %>" data-adgroup_id="<%= list[i].adgroup_id %>">
				<td>
					<a href="javascript:;"></a>
				</td>
				<td>
					<a href="javascript:;"><%= list[i].item_title %></a>
				</td>
				<td><%= list[i].keyword %></td>
				<td class="real_rank"><%= list[i].real_rank %></td>
				<td>
					<div class="input-prepend">
						<span class="add-on"></span>
						<input class="currencyinput want_rank" type="text" value="" style="width:35px" />
					</div>
				</td>
				<td>
					<div class="input-prepend">
						<span class="add-on">￥</span>
						<input class="price smallprice currencyinput keyword_price" type="text" name="price" value="<%= list[i].item_price %>" style="width:35px" />
					</div>
				</td>
				<td>
					<a href="javascript:;" class="delete-keyword-btn">取消</a>
				</td>
			</tr>
			<% } %>
		</tbody>
	</table>
	<div class="topSetting">
		<div class="setting-base kawei-ranking">
			<div class="option-name">期望排名设置：</div>
			<div class="option-content">
				在原排名基础上
				<!-- <input type="radio" name="rankingType" value="0" checked>靠前&nbsp;
				<input type="radio" name="rankingType" value="1">靠后&nbsp; -->
				<input type="text" maxlength="3" name="rankingValue">
				<span class="add-on">名</span>
			</div>
		</div>
		<div class="setting-base kawei-rate">
			<div class="option-name">卡位频率设置：</div>
			<div class="option-content">
				<select name="rateType">
					<option value="5">5分钟</option>
					<option value="10">10分钟</option>
					<option value="15">15分钟</option>
					<option value="30" selected="selected">30分钟</option>
					<option value="60">60分钟</option>
					<!--<option value="-1">自定义</option>-->
				</select>
				<div style="display:none;">
					<input type="text" name="kawei-rateValue">
					<span class="add-on">分钟</span>
				</div>
			</div>
		</div>
		<div class="setting-base kawei-time-section">
			<div class="option-name">卡位时间区间：</div>
			<div class="option-content">
				<input type="datetime-local" id="section-from">~<input type="datetime-local" id="section-to">
			</div>
		</div>
		<div class="setting-base h80 kawei-premium">
			<div class="option-name">溢价设置：</div>
			<div class="option-content">
				<div>
					<div style="display:inline-block;float:left">在原价基础上</div>
					<div>
						<!-- <input type="radio" name="premiumType" value="1" checked>加&nbsp;
						<input type="radio" name="premiumType" value="2">减&nbsp; -->
						<input type="text" class="premium" name="premiumVlaue" data-ptype="1">
						<span class="add-on">元</span>
					</div>
				</div>
				<div>
					<div style="display:inline-block;float:left">在原价基础上</div>
					<div>
						<!-- <input type="radio" name="premiumType" value="3">加&nbsp;
						<input type="radio" name="premiumType" value="4">减&nbsp; -->
						<input type="text" class="premiumPer" name="premiumVlaue" data-ptype="2">
						<span class="add-on">%</span>
					</div>
				</div>
			</div>
		</div>
		<div class="setting-base kawei-maxPrice">
			<div class="option-name">最高出价不高于：</div>
			<div class="option-content">
				<span class="add-on">￥</span>
				<input type="text" name="maxPrice">
			</div>
		</div>
		<div class="setting-base">
			<div class="option-name">卡位策略名字：</div>
			<div class="option-content">
				<input type="text" style="height:30px;width:200px;" name="kaweiName">
				<input type="hidden" style="height:30px;width:200px;" name="path" value="<%= path %>">
				&nbsp;<button class="stdbtn finish-kawei">保存</button>
			</div>
		</div>
	</div>
</script>

<script id="keyword_rank_edit_box" type="text/html">
	<table class="metrotable datatable">
		<thead>
			<tr>
				<th width="20%" class="head1">推广计划</th>
				<th width="20%" class="head0">推广组</th>
				<th width="15%" class="head1">关键词</th>
				<th width="10%" class="head0">实时排名</th>
				<th width="10%" class="head1">期望排名</th>
				<th width="10%" class="head0">当前出价</th>
				<th width="15%" class="head1">操作</th>
			</tr>
		</thead>
		<tbody>
			<% for(var i in list){ %>
			<tr data-keyword_id="<%= list[i].keyword_id %>" data-campaign_id="<%= list[i].campaign_id %>" data-adgroup_id="<%= list[i].adgroup_id %>">
				<td>
					<a href="javascript:;"></a>
				</td>
				<td>
					<a href="javascript:;"><%= list[i].item_title %></a>
				</td>
				<td><%= list[i].keyword %></td>
				<td class="real_rank"><%= list[i].real_rank %></td>
				<td>
					<div class="input-prepend">
						<span class="add-on"></span>
						<input class="currencyinput want_rank" type="text" value="<%= list[i].want_rank %>" style="width:35px" />
					</div>
				</td>
				<td>
					<div class="input-prepend">
						<span class="add-on">￥</span>
						<input class="price smallprice currencyinput keyword_price" type="text" name="price" value="<%= list[i].item_price %>" style="width:35px" />
					</div>
				</td>
				<td>
					<a href="javascript:;" class="delete-keyword-btn">取消</a>
				</td>
			</tr>
			<% } %>
		</tbody>
	</table>
	<div class="topSetting">
		<div class="setting-base kawei-ranking">
			<div class="option-name">期望排名设置：</div>
			<div class="option-content">
				在原排名基础上
				<!-- <input type="radio" name="rankingType" value="0" checked>靠前&nbsp;
				<input type="radio" name="rankingType" value="1">靠后&nbsp; -->
				<input type="text" maxlength="3" name="rankingValue">
				<span class="add-on">名</span>
			</div>
		</div>
		<div class="setting-base kawei-rate">
			<div class="option-name">卡位频率设置：</div>
			<div class="option-content">
				<select name="rateType">
					<option value="5" <%if (kawei_info.campaign_period == 5) {%>selected="selected"<%}%>>5分钟</option>
					<option value="10" <%if (kawei_info.campaign_period == 10) {%>selected="selected"<%}%>>10分钟</option>
					<option value="15" <%if (kawei_info.campaign_period == 15) {%>selected="selected"<%}%>>15分钟</option>
					<option value="30" <%if (kawei_info.campaign_period == 30) {%>selected="selected"<%}%>>30分钟</option>
					<option value="60" <%if (kawei_info.campaign_period == 60) {%>selected="selected"<%}%>>60分钟</option>
					<!--<option value="-1" <%if (kawei_info.campaign_period != 5 && kawei_info.campaign_period != 10 && kawei_info.campaign_period != 15 && kawei_info.campaign_period != 30 && kawei_info.campaign_period != 60){%>selected="selected"<%}%>>自定义</option>-->
				</select>
				<%if (kawei_info.campaign_period != 5 && kawei_info.campaign_period != 10 && kawei_info.campaign_period != 15 && kawei_info.campaign_period != 30 && kawei_info.campaign_period != 60){%>
				<div style="display:inline-block">
					<input type="text" name="kawei-rateValue" value="<%= kawei_info.campaign_period %>">
					<span class="add-on">分钟</span>
				</div>
				<% } else {%>
				<div style="display:none">
					<input type="text" name="kawei-rateValue">
					<span class="add-on">分钟</span>
				</div>
				<%}%>
			</div>
		</div>
		<div class="setting-base kawei-time-section">
			<div class="option-name">卡位时间区间：</div>
			<div class="option-content">
				<input type="datetime-local" id="section-from" value="<%= kawei_info.from %>">~<input type="datetime-local" id="section-to" value="<%= kawei_info.to %>">
			</div>
		</div>
		<div class="setting-base h80 kawei-premium">
			<div class="option-name">溢价设置：</div>
			<div class="option-content">
				<div>
					<div style="display:inline-block;float:left">在原价基础上</div>
					<div>
						<!-- <input type="radio" name="premiumType" value="1" checked>加&nbsp;
						<input type="radio" name="premiumType" value="2">减&nbsp; -->
						<input type="text" class="premium" name="premiumVlaue" data-ptype="1" <%if (kawei_info.premium.type == 1){%>value="<%= kawei_info.premium.value %>"<%}%>>
						<span class="add-on">元</span>
					</div>
				</div>
				<div>
					<div style="display:inline-block;float:left">在原价基础上</div>
					<div>
						<!-- <input type="radio" name="premiumType" value="3">加&nbsp;
						<input type="radio" name="premiumType" value="4">减&nbsp; -->
						<input type="text" class="premiumPer" name="premiumVlaue" data-ptype="2" <%if (kawei_info.premium.type == 2){%>value="<%= kawei_info.premium.value %>"<%}%>>
						<span class="add-on">%</span>
					</div>
				</div>
			</div>
		</div>
		<div class="setting-base kawei-maxPrice">
			<div class="option-name">最高出价不高于：</div>
			<div class="option-content">
				<span class="add-on">￥</span>
				<input type="text" name="maxPrice" value="<%= kawei_info.heighest_price %>">
			</div>
		</div>
		<div class="setting-base">
			<div class="option-name">卡位策略名字：</div>
			<div class="option-content">
				<input type="text" style="height:30px;width:200px;" name="kaweiName" value="<%= kawei_info.kawei_name %>">
				&nbsp;<button class="stdbtn finish-kawei" data-tactics_id="<%= kawei_info.tactics_id %>">保存</button>
			</div>
		</div>
	</div>
</script>